package Componentes;

import java.util.Calendar;

public class Fecha {

    public static int CORTA = 1;
    public static int MEDIANA = 2;
    public static int LARGA = 3;
    private String dia;
    private String mes;
    private String year;
    private Calendar c = Calendar.getInstance();

    public Fecha() {

        dia = Integer.toString(c.get(Calendar.DATE));
        mes = Integer.toString(c.get(Calendar.MONTH));
        year = Integer.toString(c.get(Calendar.YEAR));
    }

    public String Hoy(int tam) {
        switch (tam) {
            case 1:
                return (dia + "/" + mes + "/" + year);
            case 2:
                return (dia + " de " + Mes(Integer.parseInt(mes)) + " del " + year);
            case 3:
                return Dia(c.get(Calendar.DAY_OF_WEEK)) + " " + dia + " de " + Mes(Integer.parseInt(mes)) + " del " + year;
            default:
                return (dia + "/" + mes + "/" + year);
        }

    }

    public String Mes(int m) {
        switch (m) {
            case 0:
                return "Enero";
            case 1:
                return "Febrero";
            case 2:
                return "Marzo";
            case 3:
                return "Abril";
            case 4:
                return "Mayo";
            case 5:
                return "Junio";
            case 6:
                return "Julio";
            case 7:
                return "Agosto";
            case 8:
                return "Septiembre";
            case 9:
                return "Octubre";
            case 10:
                return "Noviembre";
            case 11:
                return "Diciembre";
            default:
                return "N/A";
        }
    }

    public String Dia(int d) {
        switch (d) {
            
            case 1:
                return "Domingo";
            case 2:
                return "Lunes";
            case 3:
                return "Martes";
            case 4:
                return "Miercoles";
            case 5:
                return "Jueves";
            case 6:
                return "Viernes";
            case 7:
                return "Sabado";
            
            default:
                throw new AssertionError();
        }


    }
}
